package com.example.demo.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.util.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * @author zzz
 * @Title: Response
 * @ProjectName test
 * @Description: TODO()
 * @date 2018/7/16
 */
@Data


public class Response implements Serializable {
    private static final long serialVersionUID = 2515997996565809928L;

    private Integer code;

    private String msg;

    private Object data;

    public Response(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        if(StringUtils.isEmpty(data) ){
            this.data = "";
        } else {
            this.data = data;
        }
    }
}
